interface Shape {
    void draw();
}

class Rect implements Shape {
    @Override
    public void draw() {
        System.out.println("矩形！");
    }
}

class Flower implements Shape {
    @Override
    public void draw() {
        System.out.println("❀");
    }
}

public class Interface {

    public static void drawMap(Shape shape){
        shape.draw();
    }

    public static void main(String[] args) {
        Shape shape1 = new Rect();
        Shape shape2 = new Flower();

        drawMap(shape1);
        drawMap(shape2);

        System.out.println("======================");
        Shape[] shapes = {new Rect(),new Rect(),new Flower(),new Flower()};

        for (Shape shape : shapes){
            shape.draw();
        }
    }
}